<template>
  <column :options="options" v-model:reduced="columns" />
</template>
<script setup>
import { ref } from 'vue'
import column from '@/components/icon-column-select/icon-column-select.vue'
import { useColumns } from './provide-context.js'
let columns = useColumns()
let options = ref([
  {
    title: '用户名',
    dataIndex: 'userName',
    key: 'userName',
    fixed: 'left',
    width: 100,
  },
  {
    title: '职称',
    dataIndex: 'userTitle',
    key: 'userTitle',
    width: 100,
  },
  {
    title: '工号',
    dataIndex: 'workNumber',
    key: 'workNumber',
    width: 100,
  },
  {
    title: '部门',
    dataIndex: 'userDept',
    key: 'userDept',
    width: 100,
  },
  {
    title: '入职日期',
    dataIndex: 'joinTime',
    key: 'joinTime',
    sorter: true,
    sortOrder: undefined,
    width: 120,
  },
  {
    title: '手机号',
    dataIndex: 'mobile',
    key: 'mobile',
    width: 120,
  },
  {
    title: '工作状态',
    dataIndex: 'userStatus',
    key: 'userStatus',
    filters: [
      { text: '全部', value: 'all' },
      { text: '在职', value: 'job' },
      { text: '实习', value: 'intern' },
      { text: '离职', value: 'resign' },
    ],
    filterMultiple: false,
    filteredValue: null,
    width: 120,
  },
  {
    title: '创建时间',
    dataIndex: 'gmtCreate',
    key: 'gmtCreate',
    sorter: true,
    sortOrder: undefined,
    width: 180,
  },
  {
    title: '实习截至日期',
    dataIndex: 'internshipEndDate',
    key: 'internshipEndDate',
    sorter: true,
    sortOrder: undefined,
    width: 150,
  },
  {
    title: '发布状态',
    dataIndex: 'isPublished',
    key: 'isPublished',
    filters: [
      { text: '全部', value: 'all' },
      { text: '未发布', value: '0' },
      { text: '已发布', value: '1' },
    ],
    filterMultiple: false,
    filteredValue: null,
    width: 120,
  },
  {
    title: '操作',
    dataIndex: 'operation',
    key: 'operation',
    fixed: 'right',
    width: 140,
  },
])
</script>
